#include<bits/stdc++.h>
using namespace std;
#define endl '\n'

typedef long long ll;
const int N = 1e6 + 10;
ll a[N], tmp[N];

void sort1(ll a[], int l, int r)
{
	if (l >= r) return;
	
	int mid = (l + r) >> 1;
	
	sort1(a, l, mid), sort1(a, mid + 1, r);
	
	int k = 0, i = l, j = mid + 1;
	while (i <= mid && j <= r)
		if (a[i] <= a[j]) tmp[k ++ ] = a[i ++ ];
	else tmp[k ++ ] = a[j ++ ];
	while (i <= mid) tmp[k ++ ] = a[i ++ ];
	while (j <= r) tmp[k ++ ] = a[j ++ ];
	
	for (i = l, j = 0; i <= r; i ++, j ++ ) a[i] = tmp[j];
}

void solve()
{
	int n;
	cin >> n;
	
	for(int i = 0 ;i < n; i ++ ) cin >> a[i];
	sort1(a, 0, n-1);
	for(int i = 0 ;i < n; i ++ ) cout << a[i] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	int t = 1;
	//cin >> t;
	while(t -- ) solve();
	return 0;
}

